const {
	config
} = require('../../common/config.js')
const ServerError = require('../../common/error')

const db = uniCloud.database();

async function userList(page = 0, limit = 10) {
	page = parseInt(page)
	limit = parseInt(limit)
	let {
		affectedDocs,
		data
	} = await db.collection('wechat-user').field({
		_id: true,
		nickname: true,
		avatar: true,
		openid: true,
		sex: true
	}).get();
	return {
		errCode: 0,
		data: data,
		errMsg: "User列表"
	}
}

module.exports = {
	// userAdd,
	// userDelete,
	// userUpdate,
	userList,
}
